#include<iostream>
#include<cstring>

struct Student
{
    void InitStu(int ID,const char *Name)
    {
        id=ID;
        name=strdup(Name);
    }
    int id;
    char *name;
};

using Stu=Student;
//结构体名等于类型名
//可以在结构体内定义函数
int main()
{
   Stu s;
   s.InitStu(1,"zhangsan");
    std::cout<<s.id<<" "<<s.name<<std::endl;


    return 0;
}